﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wxgm_UserInfo数据模型对象
    /// </summary>
    [Serializable]
    public partial class wxgm_UserInfoMod
    {
        /// <summary>
        /// 初始化wxgm_UserInfo数据模型对象
        /// </summary>
        public wxgm_UserInfoMod()
        {
            
        }
        /// <summary>
        /// 初始化wxgm_UserInfo数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="name">Name</param>
        /// <param name="password">Password</param>
        public wxgm_UserInfoMod(string id,string name,string password)
        {
            //给Id字段赋值
            this.Id = id;
            //给Name字段赋值
            this.Name = name;
            //给Password字段赋值
            this.Password = password;
        }
        
		//属性存储数据的变量
        private string _id;
        private string _name;
        private string _password;
        
        /// <summary>
        /// Id
        /// </summary>
        public string Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        /// <summary>
        /// Name
        /// </summary>
        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }
        /// <summary>
        /// Password
        /// </summary>
        public string Password
        {
            get { return this._password; }
            set { this._password = value; }
        }
        
        /// <summary>
        /// 对比两个wxgm_UserInfo数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wxgm_UserInfo数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wxgm_UserInfo数据模型对象
            wxgm_UserInfoMod wxgm_UserInfoMod = obj as wxgm_UserInfoMod;
            //判断是否转换成功
            if (wxgm_UserInfoMod == null) return false;
            //进行匹配属性的值
            return
                //判断Id是否一致
                this.Id == wxgm_UserInfoMod.Id &&
                //判断Name是否一致
                this.Name == wxgm_UserInfoMod.Name &&
                //判断Password是否一致
                this.Password == wxgm_UserInfoMod.Password;
        }
        /// <summary>
        /// 将当前wxgm_UserInfo数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wxgm_UserInfo数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将Id进行按位异或运算处理
                (this.Id == null ? 2147483647 : this.Id.GetHashCode()) ^
                //将Name进行按位异或运算处理
                (this.Name == null ? 2147483647 : this.Name.GetHashCode()) ^
                //将Password进行按位异或运算处理
                (this.Password == null ? 2147483647 : this.Password.GetHashCode());
        }
        /// <summary>
        /// 将当前wxgm_UserInfo数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wxgm_UserInfo数据模型对象转换成字符串副本
            return
                "[" +
                //将Id转换成字符串
                this.Id + "," +
                //将Name转换成字符串
                this.Name + "," +
                //将Password转换成字符串
                this.Password +
                "]";
        }
    }
}
